package chances.webui.taglibs;

import java.time.LocalDate;
import java.time.format.DateTimeFormatter;

@SuppressWarnings("serial")
public class MonthPickerTag extends InputTag {
	private int beginYear;
	private int endYear;
	private String min;
	private String max;
	
	private boolean duration;

	public int getBeginYear() {
		return beginYear;
	}

	public boolean isDuration() {
		return duration;
	}

	public void setDuration(boolean duration) {
		this.duration = duration;
	}

	public void setBeginYear(int beginYear) {
		this.beginYear = beginYear;
	}

	public int getEndYear() {
		return endYear;
	}

	public void setEndYear(int endYear) {
		this.endYear = endYear;
	}
	public String getMax() {
		return max;
	}

	public String getMin() {
		return min;
	}

	public void setMin(String min) {
		this.min = min;
	}

	public void setMax(String max) {
		this.max = max;
	}
	
	public String getNow(){
		return DateTimeFormatter.ofPattern("YYYY-MM").format(LocalDate.now());
	}

}
